package cn.nai.DemoRan.demo08;

class Play {
    public void play(int index) throws NoThisSongException {
        if (index > 10) {
            throw new NoThisSongException("您播放的歌曲不存在");
        }
        else {
            System.out.println("正在播放第"+index+"首歌曲");
        }

    }

    public Play() {
    }
}